package com.gbk.clickhouseservicestruct.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.myweb.ck.mapping.ChTable;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import java.util.Date;

@ChTable(name = "tig.T_TIG_STAGE_PASS_STATE")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class TIG_STAGE_PASS_STATE {

    private String id;

    /**
     * 路口id
     */
    private String cross_id;

    /**
     * 阶段编号
     */
    private Integer stage_id;

    /**
     * 流向编号
     */
    private Integer flow_id;

    /**
     * 车辆清空状态，1-清空，0-未清空
     */
    private Integer clearance;

    /**
     * 绿灯初空放状态，1-空放，0-未空放
     */
    private Integer empty_start;

    /**
     * 绿灯中空放状态，1-空放，0-未空放
     */
    private Integer empty_mid;

    /**
     * 绿灯末空放状态，1-空放，0-未空放
     */
    private Integer empty_end;

    /**
     * 饱和度
     */
    private Double saturation;

    /**
     * 通行能力
     */
    private Integer traffic_capacity;

    @Temporal(TemporalType.TIMESTAMP)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date sta_date;
}